package main

import (
	_ "fmt"
	"time"
	"fmt"
)

func main(){

	ch := make(chan int)
	timeout := make(chan int)

	go func() {
		time.Sleep(time.Second)
		timeout <- 1
	}()


	select {
	case <-ch:
		fmt.Println("ch is ready")
	case <-timeout:
	//case <-time.After(time.Second):
		fmt.Println("timeout is ready")
	}

	fmt.Println("End")

}